# MakeBy: LiuBoyuan
from typing import List, Optional
from pydantic import BaseModel
class author(BaseModel):
    author: Optional[int] = None

class NewGame(BaseModel):
    game_name: Optional[str] = None
    game_info: Optional[str] = None
    game_extends_id: Optional[int] = None
    allow_second_create: Optional[str] = "No"
    token: Optional[str] = None
    game_type : Optional[str] = None
    author : Optional[int] = None

class GameDetailBase(author, NewGame):
    ...

class GameDetailCreate(GameDetailBase):
    pass

class GameDetail(GameDetailBase):
    game_id: int
    sub_details: List['GameDetail'] = []

    class Config:
        orm_mode = True